<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>初体验3</title>
</head>
<body>
    <div id="app">
        <h2>{{msg}}</h2>
        <button v-on:click="brand">品牌</button>
        <button @click="site">网址</button>


    </div>
    <script src="../js/vue.js"></script>
    <script>
        //创建vue对象
        const app = Vue.createApp({
            data(){
                return {
                    msg:""
                }
            },
            methods:{
                brand(){
                    this.msg = "溪浅"
                },
                site(){
                    this.msg = "xiqian.top"
                }
            }
        }).mount("#app");
    </script>
</body>
</html>